<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('直播间信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>编号：</label>
                                <input type="text" name="roomCode"/>
                            </li>
                            <li>
                                <label>标题：</label>
                                <input type="text" name="name"/>
                            </li>
                      <!--      <li>
                                <label>直播计划开始时间：</label>
                                <input type="text" name="startTime"/>
                            </li>
                            <li>
                                <label>直播计划结束时间：</label>
                                <input type="text" name="endTime"/>
                            </li>-->
                            <li>
                                <label>主播昵称：</label>
                                <input type="text" name="anchorName"/>
                            </li>
                            <!--<li>
                                <label>主播微信号：</label>
                                <input type="text" name="anchorWechat"/>
                            </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="tea:room:add">
                    <i class="fa fa-plus"></i> 创建直播间
                </a>
                <!--<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="tea:room:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>-->
               <!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="tea:room:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>-->
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="tea:room:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('tea:room:edit')}]];
        var removeFlag = [[${@permission.hasPermi('tea:room:remove')}]];
        var prefix = ctx + "tea/room";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "直播间信息",
                fixedColumns: true,
                fixedNumber: 3,
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '${comment}',
                    visible: false
                },
                {
                    field: 'roomCode',
                    title: '直播间编号'
                },
                {
                    field: 'name',
                    title: '直播间名字'
                },
                {
                    field: 'coverImg',
                    title: '背景图',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<img style="width: 80px;height: 80px" src="'+row.coverImg+'" onclick="window.open(\''+ row.coverImg+'\')"/> ');
                        return actions.join('');
                    }
                },
                {
                    field: 'startTime',
                    title: '直播计划开始时间'
                },
                {
                    field: 'endTime',
                    title: '直播计划结束时间'
                },
                {
                    field: 'anchorName',
                    title: '主播昵称'
                },
                {
                    field: 'anchorWechat',
                    title: '主播微信号'
                },
                {
                    field: 'subAnchorWechat',
                    title: '主播副号微信号'
                },
                {
                    field: 'createrWechat',
                    title: '创建者微信号'
                },
                {
                    field: 'shareImg',
                    title: '分享图',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<img style="width: 80px;height: 80px" src="'+row.shareImg+'" onclick="window.open(\''+ row.shareImg+'\')"/> ');
                        return actions.join('');
                    }
                },
                {
                    field: 'feedsImg',
                    title: '购物直播频道封面图',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<img style="width: 80px;height: 80px" src="'+row.feedsImg+'" onclick="window.open(\''+ row.feedsImg+'\')"/> ');
                        return actions.join('');
                    }
                },
                {
                    field: 'isFeedsPublic',
                    title: '是否开启官方收录 '
                },
                {
                    field: 'type',
                    title: '直播间类型'
                },
                {
                    field: 'closeLike',
                    title: '是否关闭点赞'
                },
                {
                    field: 'closeGoods',
                    title: '是否关闭货架'
                },
                {
                    field: 'closeComment',
                    title: '是否关闭评论'
                },
                {
                    field: 'closeReplay',
                    title: '是否关闭回放'
                },
                {
                    field: 'closeShare',
                    title: '是否关闭分享'
                },
                {
                    field: 'closeKf',
                    title: '是否关闭客服'
                },
                {
                    field: 'createTime',
                    title: '创建时间'
                },
                {
                    field: 'recommend',
                    title: '是否推荐'
                },
                {
                    field: 'selected',
                    title: '是否精选'
                },
                /*{
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        /!*actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');*!/
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }*/]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>